package com.moore.controller;

import com.moore.bean.Industry;
import com.moore.dto.ResponseData;
import com.moore.service.IndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/industry")
public class IndustryController {
    @Autowired
    private IndustryService industryService;

    @RequestMapping("/get")
    public ResponseData getIndustryList(){
        List<Industry> list = industryService.findAll();
        return ResponseData.returnList("success",list,list.size());
    }
}
